<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改服务订单')" />
    <th:block th:include="include :: bootstrap-fileinput-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-serinfo-edit" th:object="${lmSerinfo}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">服务类型：</label>
                    <div class="col-sm-8">
                        <input name="serviceTypeName" th:field="*{serviceTypeName}" class="form-control" type="text">
                    </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">用户：</label>
                <div class="col-sm-8">
                    <input name="userName" th:field="*{userName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">服务标题：</label>
                <div class="col-sm-8">
                    <input name="serviceTitle" th:field="*{serviceTitle}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">服务发布省份：</label>
                <div class="col-sm-8">
                    <input name="provinceName" th:field="*{provinceName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">服务发布城市：</label>
                <div class="col-sm-8">
                    <input name="cityName" th:field="*{cityName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">服务内容：</label>
                <div class="col-sm-8">
                    <input name="serviceContent" th:field="*{serviceContent}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">服务图片：</label>
                <input name="serviceImages" th:field="*{serviceImages}" type="hidden">
                <div class="file-loading">
                    <input id="fileinput-demo-1" type="file" multiple data-min-file-count="1" data-max-file-count="1" data-theme="fas">
                </div>
            </div>
            <!--<div class="form-group">
                <label class="col-sm-3 control-label">服务案例：</label>
                <input name="serviceCase" th:field="*{serviceCase}" type="hidden">
                <div class="file-loading">
                    <input id="fileinput-demo-2" type="file" multiple data-min-file-count="1" data-max-file-count="1" data-theme="fas">
                </div>
            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">服务价格：</label>
                <div class="col-sm-8">
                    <input name="servicePrice" th:field="*{servicePrice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">选择服务方式：</label>
                <div class="col-sm-8">
                    <input name="serviceChoice" th:field="*{serviceChoice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">服务联系电话：</label>
                <div class="col-sm-8">
                    <input name="servicePhone" th:field="*{servicePhone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">工作时间：</label>
                <div class="col-sm-8">
                    <input name="serviceWork" th:field="*{serviceWork}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: bootstrap-fileinput-js" />
    <script th:inline="javascript">
        var prefix = ctx + "lm/serinfo";

        var images = $("#serviceImages").val().split(",");
        /*var cases = $("#serviceCase").val().split(",");*/
        debugger;
        $(document).ready(function () {
            debugger;
            $("#fileinput-demo-1").fileinput({
                'uploadUrl': '#',
                overwriteInitial: true,
                initialPreviewAsData: true,
                showUpload:false,
                initialPreview: images
            });
            /*$("#fileinput-demo-2").fileinput({
                'uploadUrl': '#',
                overwriteInitial: true,
                initialPreviewAsData: true,
                showUpload:false,
                initialPreview: cases
            });*/
        });

        $("#form-serinfo-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-serinfo-edit').serialize());
            }
        }
    </script>
</body>
</html>